<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<meta charset="utf-8">
    <title>Employee Page</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>js/timeFormat.js"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="../js/1.js"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';


function confirmDelete(employee_code){
	
	var x= window.confirm("Are you sure to delete this item?");
	if(x){
		window.location.href = BaseURL + "em/delete_em/" + employee_code;
	}	
}

</script>

<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>

<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<body >

	<div class="BodyCover">
	
 		<div class="ParentContent">
	        <?php require("admin_menu.php"); ?>
			<div class="MenuTab">
    			<div class="MenuBelow"><img src="<?php echo my_url();?>images/below-menu.gif"></div>        
             </div>
		   <div class="title">
               <h1>Employee Contact List</h1>
            </div>                      

			<div class="module-index1">
		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>
  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>
			  
		 <a href="<?php echo base_url() . "em/add_em/" ?>" >
         	<img src=" <?php echo my_url() ."images/icons/action_add.gif" ?>" style='border:none'/> Add New Data
         </a><br /><form action="<?php echo base_url(); ?>em/SearchCompany" method="post">				<fieldset>					<label><b>Search by Full Name:</b></label>					<input type="text" name="search" id="search" value="" size="40" />					<input type="submit" value="Search" id="Search" />				</fieldset>		    </form>			<br />
                <div style='overflow:scroll;width:940px;height:400px;border:1pt solid #000;'>
                <table class='Grid' width='940px' border='1'>
                  <tr>
                        <th >View</th>
                        <th >Edit</th>
                        <th nowrap="nowrap">Profile Type</th>
                        <th nowrap="nowrap">Nick Name</th>
                        <th nowrap="nowrap" colspan='2' >Full Name</th>
                        <th nowrap="nowrap">Address</th>
						<th nowrap="nowrap" colspan='3'>City, State Zipcode </th>						
                        <th nowrap="nowrap">Mobile Number</th>
						<th nowrap="nowrap">ALT Number</th>						
                        <th nowrap="nowrap">Email</th>
                        <th nowrap="nowrap">Comment</th>

                  </tr>
<?php
        		  $_rowClass = 'tr_odd';
                foreach($list_ems as $row)
                {
                         $profile_type = $row->profile_type;
					     $em_n_name = $row->em_n_name;
						 $f_name = $row->f_name;
						 $l_name = $row->l_name;
					     $address = $row->address;
                         $city = $row->city;
						 $state = $row->state;
						 $zipcode = $row->zipcode;
						 $cell_phone_num = $row->cell_phone_num;
						 $alt_phone_num = $row->alt_phone_num;
						 $email_add = $row->email_add;
						 $em_comment_box = $row->em_comment_box;
?>					
					<tr class="<?php echo $_rowClass ?>"  <?php echo GetTrEffects() ?> >
                        <td width='5'>
                                <a href="<?php echo base_url() . "em_loads/view_em_loads/". $row->employee_code?>" >
                                <img src="<?php echo my_url() . "images/icons/view.gif" ?>" style='border:none'/></a>
						</td>
                        <td width='5'>
                        	<a href="<?php echo base_url() . "em/edit_em/" . $row->employee_code ?>">
                            	<img src="<?php echo my_url() . "images/icons/edit.gif" ?>" style='border:none' />
                             </a>
						</td>
                     	<td nowrap="nowrap"><?php echo $profile_type ?></td>
                        <td nowrap="nowrap"><?php echo $em_n_name?></td>
                        <td nowrap="nowrap" colspan='2'> <?php echo $f_name.",&nbsp".$l_name?></td>
                        <td nowrap="nowrap"><?php echo $address?></td>
                        <td nowrap="nowrap" colspan='3'> <?php echo $city.",&nbsp".$state.",&nbsp".$zipcode?></td>
                        <td nowrap="nowrap"><?php echo $cell_phone_num?></td>
                        <td nowrap="nowrap"><?php echo $alt_phone_num?></td>						
                        <td nowrap="nowrap"><?php echo $email_add?></td>
						<td nowrap="nowrap"><?php echo $em_comment_box?></td>                        
                  </tr>
<?php                  
				  if($_rowClass=="tr_odd") $_rowClass="tr_even"; else $_rowClass="tr_odd";     
                 }
?>
                 </table></div> 
       
    		<br>

            <div class="BodyContent">
            </div>	
		</div><!---end of ParentContent ---->		    <div class="Footer1">	                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>                 <a href="http://webmartis.com"> <img src="<?php echo my_url();?>images/wmlink.png"></a>                </div>                            </div> <!---end of Footer1 ---->        		
    </div> <!---end of BodyCover ---->
 
</body>
<?php } ?>
</html>

